package com.bbzn.device.client.service.impl;

import com.bbzn.device.client.dto.process.MiddleFlowNodeDTO;
import com.bbzn.device.client.utils.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.bbzn.device.client.dataobject.MiddleFlowNode;
import com.bbzn.device.client.dao.process.MiddleFlowNodeMapper;
import java.util.List;
import com.bbzn.device.client.service.MiddleFlowNodeService;
@Service
public class MiddleFlowNodeServiceImpl implements MiddleFlowNodeService{

    @Resource
    private MiddleFlowNodeMapper middleFlowNodeMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return middleFlowNodeMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(MiddleFlowNode record) {
        return middleFlowNodeMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(MiddleFlowNode record) {
        return middleFlowNodeMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(MiddleFlowNode record) {
        return middleFlowNodeMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(MiddleFlowNode record) {
        return middleFlowNodeMapper.insertSelective(record);
    }

    @Override
    public MiddleFlowNode selectByPrimaryKey(Long id) {
        return middleFlowNodeMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(MiddleFlowNode record) {
        return middleFlowNodeMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(MiddleFlowNode record) {
        return middleFlowNodeMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<MiddleFlowNode> findByAll(MiddleFlowNode middleFlowNode) {
        return middleFlowNodeMapper.findByAll(middleFlowNode);
    }

    @Override
    public int updateBatch(List<MiddleFlowNode> list) {
        return middleFlowNodeMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<MiddleFlowNode> list) {
        return middleFlowNodeMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<MiddleFlowNode> list) {
        return middleFlowNodeMapper.batchInsert(list);
    }

    @Override
    public PageInfo<MiddleFlowNode> selectPageBySelective(MiddleFlowNodeDTO record) {
        PageInfo<MiddleFlowNode> pageInfo = new PageInfo<>();
        pageInfo.setPageNum(record.getPageNum());
        pageInfo.setPageSize(record.getPageSize());
        pageInfo.setResultList(middleFlowNodeMapper.selectPageBySelective(record));
        int count = middleFlowNodeMapper.selectCountBySelective(record);
        pageInfo.setTotalRecord(count);
        return pageInfo;
    }
}
